package cn.nai.DemoRan.demo07;

import java.util.Scanner;

public class ShapeTest {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        System.out.println("请输入圆的半径：");
        double radius = s.nextDouble();
        Circle1 circle = new Circle1();
        double area1 = circle.area(radius);
        System.out.println("请输入正方形的边长：");
        double length = s.nextDouble();
        Square square = new Square();
        double area2 = square.area(length);
        System.out.println("圆的面积为: " + area1 + ",正方形的面积为: " + area2);
    }
}
